function createPerson(name,age,sex) {
    var obj = new Object();
    obj.name = name;
    obj.age = age;
    obj.sex = sex;
    obj.sayName = function() {
        return this.name;
    }
    return obj;
}
var p1 = new createPerson('longen','28','男');
var p2 = new createPerson('tugenhua','27','女');
console.log(p1.name);
console.log(p1.age);
console.log(p1.sayName());
console.log(p1)

console.log(p2.name);
console.log(p2.age);
console.log(p2.sayName());
console.log(p2)

console.log(typeof(p1))
console.log(typeof p2)
console.log(p1 instanceof Object)
console.log(p1 instanceof(Object))